<?php

use Illuminate\Http\Request;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/

Route::middleware('auth:api')->get('/user', function (Request $request) {
    return $request->user();
});

Route::get('/getData','ShopController@getData')->name('getData');

Route::get('info','ShopController@info')->name('info');

Route::post('create','ShopController@create')->name('create');

Route::post('uploadImgTest','ProductController@uploadImgTest');

Route::post('addProduct','ProductController@addProduct');

Route::get('buycar','OrdersController@buyCar')->name('buycar');//购物车查询
Route::get('index','OrdersController@index')->name('index');
Route::get('indent','IndentController@indent');
Route::get('theOrder','IndentController@theOrder');
Route::post('login','IndentController@login');
